/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.bl.controller;

import java.util.logging.Level;
import java.util.logging.Logger;
import upc.jfactory.scp.jpa.bean.Contratacion;
import upc.jfactory.scp.jpa.controlador.ContratacionJpaController;
import upc.jfactory.scp.jpa.controlador.exceptions.PreexistingEntityException;

/**
 *
 * @author Karen
 */
public class ContratacionController {
  public ContratacionController(){}
  public void contratar(Contratacion contrato){
        try {
            ContratacionJpaController contratacionjpa = new ContratacionJpaController();
            contratacionjpa.create(contrato);
        } catch (PreexistingEntityException ex) {
            Logger.getLogger(ContratacionController.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(ContratacionController.class.getName()).log(Level.SEVERE, null, ex);
        }
  }

}
